<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="./jquery.js"></script>
<body>
    <img src="./favicon.ico" alt="img_icon">
    <span id="foo[bar]">sas</span>
    <span id="foo:bar">sasdw</span>
    <button id="jquery">jquery绑定事件</button>
    <script>
//原生的js来查找dom元素
let img=document.querySelector("[alt='img_icon']");
console.log(img);

//jquery查找dom
// $(document).ready(()=>{
//     let $img=$("[alt='img_icon']")[0];
//     console.log($img);
// })


//绑定jquery
let $btn=$("#jquery");
$btn.click(()=>{
    alert("jquery已经绑定");
})


//特殊符号的id \\两个转意符
console.log($("#foo\\[bar\\]"));
console.log($("#foo\\:bar"));

console.log("________________________");
//找到每一个元素 *
console.log($("*"));

console.log("_____sa________________________");
//找到多个元素(xxx.xxx.xxx)
console.log($("#jquery,img"));
    </script>
</body>
</html>